@keyframes scroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: inherit;
  min-width: 0;

  .text {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: max-content;
  }
}

.textWrapper {
  display: inline-flex;
  white-space: nowrap;
  width: 100%;
  text-align: left;
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.text {
  white-space: nowrap;
  display: inline-block;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: inherit;
  font-weight: bold;
  flex-shrink: 1;
  min-width: 0;
}

.clone {
  display: none;
}

.container[data-scroll]:hover {
  mask: linear-gradient(to right, transparent, black 5%, black 95%, transparent);

  .textWrapper {
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    animation: scroll var(--scroll-time, 8s) linear infinite;
  }

  .text {
    flex-shrink: 0;
    overflow: visible;
    text-overflow: clip;
    width: auto;
  }

  .clone {
    display: inline-block;

    &::before {
      content: '';
      display: inline-block;
      width: 1em;
      white-space: pre;
    }

    &::after {
      content: '';
      display: inline-block;
      width: 1em;
      white-space: pre;
    }
  }
}
